Port Conflicts
Port 8080 already in use (Backend)
Port 8080 already in use (Backend)
Error Message:Solution:
- Find the process using port 8080:
- Kill the process:
- Or change the backend port in
application.properties:
If you change the backend port, update the frontend API calls accordingly.
Port 5173 already in use (Frontend)
Port 5173 already in use (Frontend)
Error Message:Solution:
- Find and kill the process:
- Or let Vite use a different port automatically (it will suggest 5174, 5175, etc.)
-
Or specify a custom port in
vite.config.ts:
Port 3306 already in use (MySQL)
Port 3306 already in use (MySQL)
Error Message:Solution:
- Check if MySQL is running:
- If another MySQL instance is running on 3306, either:
- Stop that instance
- Or change the database port in
application.properties:
- Restart your MySQL server:
Dependency Issues
npm install fails or node_modules issues
npm install fails or node_modules issues
Common Errors:Solutions:
- Clear npm cache:
- Delete node_modules and package-lock.json:
- If using a different Node version, use nvm:
- Check for permission issues:
The project uses Vite 7.3.1 and React 19.2.0. Ensure you have Node.js 18+ installed.
Maven build failures
Maven build failures
Error Message:Solutions:
- Clean and rebuild:
- Check Java version (project requires Java 21):
- If wrong version, install Java 21:
- Clear Maven cache:
- Skip tests if they’re failing:
Authentication Issues
JWT token expiration errors
JWT token expiration errors
Error in Browser Console:Explanation:Tokens expire after 24 hours (configured in
JwtUtil.java:17).Solutions:- Log out and log back in to get a new token
-
For development, increase token expiration in
JwtUtil.java:
- Implement token refresh mechanism in your frontend
- Check token in browser DevTools:
Tokens are stored in localStorage. Clear storage if you encounter persistent issues:
Invalid JWT token errors
Invalid JWT token errors
Error Message:Solutions:
- Clear localStorage in browser:
-
Verify the token format:
- Should have 3 parts separated by dots:
header.payload.signature
- Should have 3 parts separated by dots:
-
Check if the secret key matches between environments:
- Located in
JwtUtil.java:16
- Located in
- Ensure token is sent with correct header:
Frontend-Backend Connection
Cannot connect to backend API
Cannot connect to backend API
Error in Browser Console:Solutions:
- Verify backend is running:
- Check backend port in
application.properties:4:
- Verify API base URL in frontend code
- Check firewall settings:
- Ensure MySQL is running (backend won’t start without it):
API returns 404 for existing endpoints
API returns 404 for existing endpoints
Error:Solutions:
-
Check the API endpoint path:
- Authentication:
/api/auth/** - Products:
/api/productos/** - Categories:
/api/categorias/**
- Authentication:
- Verify controller mapping in backend code
- Check for typos (especially with special characters like ü in “Iqüea”)
- Look at backend console logs for actual registered endpoints:
Development Server Issues
Hot reload not working (Frontend)
Hot reload not working (Frontend)
Problem:
Changes to React components don’t reflect in the browser.Solutions:
- Check if Fast Refresh is enabled in
vite.config.ts:
- Restart the dev server:
-
Clear browser cache:
- Chrome/Edge: Ctrl+Shift+Delete
- Or hard reload: Ctrl+Shift+R
- Check for TypeScript errors:
- Ensure file is saved and within src directory
Backend changes not reflecting (Spring Boot DevTools)
Backend changes not reflecting (Spring Boot DevTools)
Problem:
Code changes require manual restart.Solutions:
- Verify Spring Boot DevTools is in
pom.xml(line 79-82):
-
Enable “Build project automatically” in your IDE:
- IntelliJ: Settings → Build → Compiler → Build project automatically
- Eclipse: Project → Build Automatically
- For structural changes (new classes, dependencies), restart manually:
DevTools only hot-reloads code changes. Configuration changes in
application.properties require a full restart.Additional Resources
- Database Errors - Database connection and query issues
- CORS Issues - Cross-origin request problems
- GitHub Issues - Report bugs